.class public Lcom/glympse/android/glympse/ViewDestination;
.super Landroid/widget/LinearLayout;
.source "ViewDestination.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/glympse/android/glympse/ViewDestination$MyGlympseView;,
        Lcom/glympse/android/glympse/ViewDestination$OnClickDone;,
        Lcom/glympse/android/glympse/ViewDestination$OnKeyName;,
        Lcom/glympse/android/glympse/ViewDestination$ZoomTimer;
    }
.end annotation


# instance fields
.field private m_oDestination:Lcom/glympse/platform/common/Place;

.field private m_oEditName:Landroid/widget/EditText;

.field public m_oGlympseView:Lcom/glympse/android/glympse/ViewDestination$MyGlympseView;

.field private m_oRelativeLayoutMap:Landroid/widget/RelativeLayout;

.field private m_oZoomTimer:Lcom/glympse/android/glympse/ViewDestination$ZoomTimer;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2
    .parameter "context"

    .prologue
    const/4 v1, 0x0

    .line 43
    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 33
    new-instance v0, Lcom/glympse/android/glympse/ViewDestination$MyGlympseView;

    invoke-direct {v0, p0}, Lcom/glympse/android/glympse/ViewDestination$MyGlympseView;-><init>(Lcom/glympse/android/glympse/ViewDestination;)V

    iput-object v0, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oGlympseView:Lcom/glympse/android/glympse/ViewDestination$MyGlympseView;

    .line 35
    iput-object v1, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oEditName:Landroid/widget/EditText;

    .line 36
    iput-object v1, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oRelativeLayoutMap:Landroid/widget/RelativeLayout;

    .line 37
    new-instance v0, Lcom/glympse/platform/common/Place;

    invoke-direct {v0}, Lcom/glympse/platform/common/Place;-><init>()V

    iput-object v0, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oDestination:Lcom/glympse/platform/common/Place;

    .line 38
    new-instance v0, Lcom/glympse/android/glympse/ViewDestination$ZoomTimer;

    invoke-direct {v0, p0}, Lcom/glympse/android/glympse/ViewDestination$ZoomTimer;-><init>(Lcom/glympse/android/glympse/ViewDestination;)V

    iput-object v0, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oZoomTimer:Lcom/glympse/android/glympse/ViewDestination$ZoomTimer;

    .line 44
    return-void
.end method

.method static synthetic access$0(Lcom/glympse/android/glympse/ViewDestination;Landroid/widget/EditText;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 35
    iput-object p1, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oEditName:Landroid/widget/EditText;

    return-void
.end method

.method static synthetic access$1(Lcom/glympse/android/glympse/ViewDestination;)Landroid/widget/EditText;
    .locals 1
    .parameter

    .prologue
    .line 35
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oEditName:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$2(Lcom/glympse/android/glympse/ViewDestination;)Lcom/glympse/platform/common/Place;
    .locals 1
    .parameter

    .prologue
    .line 37
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oDestination:Lcom/glympse/platform/common/Place;

    return-object v0
.end method

.method static synthetic access$3(Lcom/glympse/android/glympse/ViewDestination;Landroid/widget/RelativeLayout;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 36
    iput-object p1, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oRelativeLayoutMap:Landroid/widget/RelativeLayout;

    return-void
.end method

.method static synthetic access$4(Lcom/glympse/android/glympse/ViewDestination;)Landroid/widget/RelativeLayout;
    .locals 1
    .parameter

    .prologue
    .line 36
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oRelativeLayoutMap:Landroid/widget/RelativeLayout;

    return-object v0
.end method

.method static synthetic access$5(Lcom/glympse/android/glympse/ViewDestination;Lcom/glympse/android/glympse/ViewDestination$ZoomTimer;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 38
    iput-object p1, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oZoomTimer:Lcom/glympse/android/glympse/ViewDestination$ZoomTimer;

    return-void
.end method

.method static synthetic access$6(Lcom/glympse/android/glympse/ViewDestination;)Lcom/glympse/android/glympse/ViewDestination$ZoomTimer;
    .locals 1
    .parameter

    .prologue
    .line 38
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oZoomTimer:Lcom/glympse/android/glympse/ViewDestination$ZoomTimer;

    return-object v0
.end method


# virtual methods
.method protected OnDone()V
    .locals 7

    .prologue
    const-wide v3, 0x412e848000000000L

    .line 138
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oDestination:Lcom/glympse/platform/common/Place;

    iget-object v1, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oEditName:Landroid/widget/EditText;

    invoke-virtual {v1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v1

    invoke-interface {v1}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/glympse/platform/common/Place;->m_strName:Ljava/lang/String;

    .line 143
    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v0, v0, Lcom/glympse/android/glympse/Glympse;->m_oMapControl:Lcom/glympse/android/glympse/MapControl;

    iget-boolean v0, v0, Lcom/glympse/android/glympse/MapControl;->m_fPanning:Z

    if-eqz v0, :cond_0

    .line 145
    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v0, v0, Lcom/glympse/android/glympse/Glympse;->m_oMapControl:Lcom/glympse/android/glympse/MapControl;

    invoke-virtual {v0}, Lcom/glympse/android/glympse/MapControl;->getProjection()Lcom/google/android/maps/Projection;

    move-result-object v0

    .line 146
    sget-object v1, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v1, v1, Lcom/glympse/android/glympse/Glympse;->m_oMapControl:Lcom/glympse/android/glympse/MapControl;

    invoke-virtual {v1}, Lcom/glympse/android/glympse/MapControl;->getWidth()I

    move-result v1

    div-int/lit8 v1, v1, 0x2

    sget-object v2, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v2, v2, Lcom/glympse/android/glympse/Glympse;->m_oMapControl:Lcom/glympse/android/glympse/MapControl;

    invoke-virtual {v2}, Lcom/glympse/android/glympse/MapControl;->getHeight()I

    move-result v2

    div-int/lit8 v2, v2, 0x2

    .line 145
    invoke-interface {v0, v1, v2}, Lcom/google/android/maps/Projection;->fromPixels(II)Lcom/google/android/maps/GeoPoint;

    move-result-object v6

    .line 148
    .local v6, oGeoPoint:Lcom/google/android/maps/GeoPoint;
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oDestination:Lcom/glympse/platform/common/Place;

    invoke-virtual {v6}, Lcom/google/android/maps/GeoPoint;->getLatitudeE6()I

    move-result v1

    int-to-double v1, v1

    div-double/2addr v1, v3

    iput-wide v1, v0, Lcom/glympse/platform/common/Place;->m_dLatitude:D

    .line 149
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oDestination:Lcom/glympse/platform/common/Place;

    invoke-virtual {v6}, Lcom/google/android/maps/GeoPoint;->getLongitudeE6()I

    move-result v1

    int-to-double v1, v1

    div-double/2addr v1, v3

    iput-wide v1, v0, Lcom/glympse/platform/common/Place;->m_dLongitude:D

    .line 152
    .end local v6           #oGeoPoint:Lcom/google/android/maps/GeoPoint;
    :cond_0
    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v0, v0, Lcom/glympse/android/glympse/Glympse;->m_oViewSendGlympse:Lcom/glympse/android/glympse/ViewSendGlympse;

    .line 153
    iget-object v1, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oDestination:Lcom/glympse/platform/common/Place;

    iget-object v1, v1, Lcom/glympse/platform/common/Place;->m_strName:Ljava/lang/String;

    .line 154
    iget-object v2, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oDestination:Lcom/glympse/platform/common/Place;

    iget-wide v2, v2, Lcom/glympse/platform/common/Place;->m_dLatitude:D

    .line 155
    iget-object v4, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oDestination:Lcom/glympse/platform/common/Place;

    iget-wide v4, v4, Lcom/glympse/platform/common/Place;->m_dLongitude:D

    .line 152
    invoke-virtual/range {v0 .. v5}, Lcom/glympse/android/glympse/ViewSendGlympse;->SetDestination(Ljava/lang/String;DD)V

    .line 158
    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    sget-object v1, Lcom/glympse/android/glympse/Glympse$EAnimations;->None:Lcom/glympse/android/glympse/Glympse$EAnimations;

    invoke-virtual {v0, v1}, Lcom/glympse/android/glympse/Glympse;->PopView(Lcom/glympse/android/glympse/Glympse$EAnimations;)Lcom/glympse/android/glympse/Glympse$EViews;

    .line 159
    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    sget-object v1, Lcom/glympse/android/glympse/Glympse$EAnimations;->None:Lcom/glympse/android/glympse/Glympse$EAnimations;

    invoke-virtual {v0, v1}, Lcom/glympse/android/glympse/Glympse;->PopView(Lcom/glympse/android/glympse/Glympse$EAnimations;)Lcom/glympse/android/glympse/Glympse$EViews;

    .line 160
    return-void
.end method

.method public SetDestination(Ljava/lang/String;DD)V
    .locals 2
    .parameter "strName"
    .parameter "dLatitude"
    .parameter "dLongitude"

    .prologue
    .line 130
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oDestination:Lcom/glympse/platform/common/Place;

    invoke-static {p1}, Lcom/glympse/platform/common/Helpers;->SafeStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/glympse/platform/common/Place;->m_strName:Ljava/lang/String;

    .line 131
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oDestination:Lcom/glympse/platform/common/Place;

    iput-wide p2, v0, Lcom/glympse/platform/common/Place;->m_dLatitude:D

    .line 132
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewDestination;->m_oDestination:Lcom/glympse/platform/common/Place;

    iput-wide p4, v0, Lcom/glympse/platform/common/Place;->m_dLongitude:D

    .line 133
    return-void
.end method
